<php>
$this->display(tpl('head')); 
</php>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  	<legend>添加用户</legend>
</fieldset>
<style>
	.layui-form-select{
		width: 30%;
	}
</style>
<form class="layui-form" method="post" action="/admin/user/add">
	
	<table class="layui-table my-tabel">
		<tr>
			<td>所属用户组</td>
			<td>
				<foreach array="C('USER_GROUP')" f="1">
				<php>
					$checked=$key===2  ? "checked" : '';
				</php>
				<input name="groupid" value="{{$key }}" title="{{$row['name'] }}" type="radio" $checked>
				</foreach>
			</td>
		</tr>
		<tr>
			<td>用户名</td>
			<td><input name="username" class="layui-input my-input" placeholder="用户名" type="text" value="{{$edit['username'] }}"></td>
		</tr>
		<tr>
			<td>密码</td>
			<td><input name="password" class="layui-input my-input" placeholder="密码" type="password" value="{{$edit['password'] }}"></td>
		</tr>
		<tr>
			<td>邮箱</td>
			<td><input name="email" class="layui-input my-input"  placeholder="邮箱" type="text" value="{{$edit['email'] }}"></td>
		</tr>
		<tr>
			<td>手机号码</td>
			<td><input name="mobile" class="layui-input my-input" placeholder="手机号码" type="text" value="{{$edit['mobile'] }}"></td>
		</tr>
		<tr>
			<td colspan="2" class="my_button">
				<input type="hidden" name="step" id="step" value="post" />
				<button class="layui-btn" lay-submit="" lay-filter="post">立即提交</button>
			</td>
			
		</tr>
	</table>
</form>
<script>
		layui.use(['form'], function(){
				var form=layer.form;
		})
</script>

<php>
$this->display(tpl('foot')); 
</php>
